package com.corx.network.core.network;

import com.corx.network.core.listener.ReceivedMessageListener;
import com.corx.network.core.model.ReceivedMessage;

/**
 * @author gx
 * @version 1.0.0
 */
public interface MqttNetwork extends Network {


    /**
     * 订阅某个主题
     *
     * @param topic 主题
     * @param qos   qos等级
     */
    void subscribe(String topic, int qos, ReceivedMessageListener<ReceivedMessage, ReceivedMessage> listener) throws Exception;

    /**
     * 取消订阅主题
     *
     * @param topic 主题
     */
    void unsubscribe(String topic) throws Exception;



}
